home *** CD-ROM | disk | FTP | other *** search
/ The 640 MEG Shareware Studio 2 / The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO / pascal / sndsgood.zip / SNDSGOOD.DOC < prev    next >
Text File  |  1992-02-21  |  7KB  |  301 lines

  1.  
  2.  
  3.  
  4.   *************************************************************************
  5.   *                                                                       *
  6.   *                  Documentation for SoundsGood Version 2.0             *
  7.   *                                                                       *
  8.   *                 Copyright (c) 1992 by Richard C. Leinecker            *
  9.   *                                                                       *
  10.   *************************************************************************
  11.  
  12.  
  13.  
  14.  
  15. Sounds Good is a sound editor for the PC speaker. It lets you create,
  16. edit, and play sounds that can be used in your programs. The sounds
  17. that you create can be saved to disk and loaded in you program.
  18.  
  19.  
  20.  
  21. The Sounds Good archived file should contain the following files:
  22. SG.EXE - the sound editor program
  23. SG_C.H - an include file for C programs
  24. C_EXMPL1.C - a C example program in small memory model
  25. C_EXMPL2.C - a C example program in large memory model
  26. B_EXMPLE.BAS - a QuickBASIC example program
  27. SG_BASIC.LIB - the BASIC library
  28. SG_CPAS.LIB - the C and Pascal library
  29. SOUND01.SRC
  30. SOUND01.SND
  31. SOUND02.SRC
  32. SOUND02.SND
  33. SOUND03.SRC
  34. SOUND03.SND
  35. SOUND04.SRC
  36. SOUND04.SND
  37. SOUND05.SRC
  38. SOUND05.SND
  39. SOUND06.SRC
  40. SOUND06.SND
  41. SOUND07.SRC
  42. SOUND07.SND
  43. SOUND08.SRC
  44. SOUND08.SND
  45. SOUND09.SRC
  46. SOUND09.SND
  47.  
  48.  
  49. Along with the Sounds Good editor program is a set of library routines
  50. that let you easily use the sounds you've created in your programs.
  51. They are interrupt driven too, so after the sounds are started, you
  52. can do other things.
  53.  
  54. This program is ShareWare. If you use it, you should register. If you
  55. use the library routines in any program--PD, ShareWare, commercial, or
  56. otherwise--you must register. You don't have permission to use the
  57. library in your program except for personal use until you register.
  58. Along with registration, I'll send you source code.
  59.  
  60. To register, send $15 to Richard C. Leinecker, P.O. Box 2567, Reidsville,
  61. North Carolina 27323-2567.
  62.  
  63.  
  64. PLAYING AND RECORDING
  65.  
  66. The easiest way to create tunes is to play them by pressing the correct
  67. keys or clicking on the note buttons with the mouse. Notice toward the
  68. lower left portion of the screen that there are notes and frequencies.
  69. Each one has a keyboard key that you can press to play the note. You can
  70. also click the left mouse button on any of the blocks to play the note.
  71.  
  72. When you play a note it's automatically inserted in the sound list. The
  73. frequency and duration are placed according to the note you played and
  74. the duration for which you played it.
  75.  
  76. You can change the frequency range to another octave by pressing the Tab key
  77. of clicking the mouse button on the octave block (left button raises, right
  78. lowers.)
  79.  
  80.  
  81. INSERTING FUNCTIONS INTO THE LIST
  82.  
  83. You can edit any of the sounds in the list by pressing return on the sound
  84. that's highlighted or clicking the right mouse button on it.
  85.  
  86. You can insert any of the functions into the sound list by clicking the
  87. mouse on it or pressing Shift- and the key (usually a number) next to
  88. the function.
  89.  
  90.  
  91. PLAYING SOUNDS
  92.  
  93. Play the sounds by using the menus or pressing Ctrl-P. Stop the sounds by
  94. using the menus or pressing Ctrl-S.
  95.  
  96.  
  97. COPYING, CUTTING, AND PASTING
  98.  
  99. You can copy, cut, and paste any of the sounds in the list. Use the mouse
  100. to highlight a block or use F1 to start and end a block. Then use the menu or
  101. Ctrl-C to copy, Ctrl-X to cut, Ctrl-T to paste, and Ctrl-D to delete.
  102.  
  103.  
  104. The Functions:
  105.  
  106. -Editible Sounds:
  107.  
  108. Tone [Frq] [Del]
  109.   Frq - Frequency in Hertz
  110.   Del - Delay in 1/18th seconds
  111.  
  112. Silence [Del]
  113.   Del - Delay in 1/18th seconds
  114.  
  115. Ascend [Frq] [Frq] [Del] [Cnt] [Step]
  116.   Frq - Starting frequency in Hertz
  117.   Frq - Ending frequency in Hertz
  118.   Del - Delay in 1/18th seconds between steps
  119.   Cnt - Number of repeats
  120.   Step - Amount of increase
  121.  
  122. Descend [Frq] [Frq] [Del] [Cnt] [Step]
  123.   Frq - Starting frequency in Hertz
  124.   Frq - Ending frequency in Hertz
  125.   Del - Delay in 1/18th seconds    between steps
  126.   Cnt - Number of repeats
  127.   Step - Amount of decrease
  128.  
  129. Trill [Frq] [Frq] [Del] [Cnt]
  130.   Frq - Starting frequency in Hertz
  131.   Frq - Ending frequency in Hertz
  132.   Del - Delay in 1/18th seconds    between the interval
  133.   Cnt - Number of repeats
  134.  
  135. Interval [Frq] [Frq] [Del] [Cnt] [Step]
  136.   Frq - Starting frequency in Hertz
  137.   Frq - Ending frequency in Hertz
  138.   Del - Delay in 1/18th seconds between interval
  139.   Cnt - Number of repeats
  140.   Step - Amount of increase for each successive interval
  141.  
  142. On/Off [Frq] [Del] [Cnt]
  143.   Frq - Frequency in Hertz
  144.   Del - Delay in 1/18th seconds
  145.   Cnt - Number of repeats
  146.  
  147. -Predefined Sounds
  148.  
  149. Siren
  150. Whistle
  151. Alarm
  152. Gun
  153. Blast
  154.  
  155.  
  156. Sound Frequencies:
  157.  
  158. Here is a partial list of some sound frequencies.
  159.  
  160. Note    Frequency
  161.  
  162. C         131
  163. D         147
  164. E         165
  165. F         175
  166. G         196
  167. A         220
  168. B         247
  169. C         262
  170. D         294
  171. E         330
  172. F         349
  173. G         392
  174. A         440
  175. B         494
  176. C         523
  177. D         587
  178. E         659
  179. F         698
  180. G         784
  181. A         880
  182. B         988
  183. C         1046
  184. D         1175
  185. E         1318
  186. F         1397
  187. G         1568
  188. A         1760
  189. B         1975
  190.  
  191.  
  192. Programming:
  193.  
  194. First, make sure that your linker links in the appropriate library file.
  195.  
  196.  
  197. -Installing the interrupt
  198.  
  199. You have to turn the interupt on before the sounds will play. At the
  200. beginning of your progrgam (or at least before you begin any sounds)
  201. make the following call.
  202.  
  203. BASIC
  204. call installit
  205.  
  206. C
  207. installit();
  208.  
  209. Pascal
  210. call installit;
  211.  
  212. -Removing the interrupt
  213.  
  214. You have to remove the interrupt before exiting the program or the
  215. computer will crash. Make the following call before exiting.
  216.  
  217. BASIC
  218. call removeit
  219.  
  220. C
  221. removeit();
  222.  
  223. Pascal
  224. call removeit;
  225.  
  226.  
  227. -Starting a sound
  228.  
  229. The sound routines update themselves and behave exactly as those in the
  230. sound editor. You'll have to first load the sounds into the buffer.
  231.  
  232. BASIC
  233. REM sound is already loaded
  234. calls dosound( soundbuffer$ )
  235.  
  236. C
  237. dosound( soundbuffer );
  238.  
  239. Pascal
  240. dosound( soundbuffer );
  241.  
  242.  
  243. -Finding out how many events remain
  244.  
  245. Use the following routine to determine how much of the sound remains
  246. in the queue. Returns a value if there are events even if the sound is
  247. paused.
  248.  
  249. BASIC
  250. calls eventsleft( events% )
  251.  
  252. C
  253. events = eventsleft();
  254.  
  255. Pascal
  256. events = eventsleft;
  257.  
  258.  
  259. -Finding out if there's a sound going on
  260.  
  261. This is different than the eventsleft call. It returns a non-zero if a 
  262. sound is being played and a zero if no sound is being played. If a sound
  263. is paused, it will return a zero.
  264.  
  265. BASIC
  266. calls soundsareon( soundflag% )
  267.  
  268. C
  269. soundflag = soundsareon();
  270.  
  271. Pascal
  272. soundflag = soundsareon;
  273.  
  274. -Pause the sound
  275.  
  276. BASIC
  277. call pausesound
  278.  
  279. C
  280. pausesound();
  281.  
  282. Pascal
  283. pausesound;
  284.  
  285. -Unpause the sound
  286.  
  287. BASIC
  288. call unpausesound
  289.  
  290. C
  291. unpausesound();
  292.  
  293. Pascal
  294. unpausesound;
  295.  
  296. You can leave me messages on CompuServe (user number [74676,457])
  297. or GEnie (mail address R.LEINECKER).
  298.  
  299. For orders or inquiries use the included order form.
  300.  
  301.